using System;

namespace OpenWaves.ActivityFeed
{
    public static class Time
    {
        private static DateTime? _now;
        public static DateTime Now
        {
            get { return _now ?? DateTime.UtcNow; }
            set { _now = value; }
        }

        public static void Resume()
        {
            _now = null;
        }

        public static void NextDay()
        {
            if ( _now == null)
            {
                _now = DateTime.Now;
            }
            _now = _now.Value.AddDays(1);
        }

        public static  void IncreaseMinutes(int minutes)
        {
            if (_now == null)
            {
                _now = DateTime.Now;
            }
            _now = _now.Value.AddMinutes(minutes);
        }
    }
}